<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-for</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <ul id="app">
        <li>姓名     年龄</li>
        <li v-for="(item, index) in people" :key="index" >{{item.name+"  "+item.age}}</li>
    </ul>
    <!-- 生成一个无序列表五个 -->
    <!-- table>tr>th*6>td*5 -->
    <!-- 生成一个六行五列的表格 -->
</body>
<script>
    var vm=new Vue({
        el:"#app",
        data:{
            people:[{
                name:"张三",
                age:18
            },{
                name:"李四",
                age:20
            },{
                name:"王五",
                age:22
            }]
        }
    })
</script>
</html>